package com.gec.service.impl;

import com.gec.dao.DocumentDao;
import com.gec.dao.impl.DocumentDaoImpl;
import com.gec.domain.Document;
import com.gec.service.DocumentService;
import com.gec.utils.PageModel;

import java.util.List;

public class DocumentServiceImpl implements DocumentService {
    DocumentDao dao=new DocumentDaoImpl();
    //查询全部
    @Override
    public List<Document> findAlldocument(Document document, PageModel model) {
        return dao.findAlldocument(document,model);
    }

    //单个查询
    @Override
    public Document findById(int id) {
        return dao.findById(id);
    }

    //上传文件
    @Override
    public void addDocument(Document document) {
        dao.addDocument(document);
    }

    @Override
    public int getTotalDocumentCount(Document document) {
        return dao.getTotalDocumentCount(document);
    }

    @Override
    public Document downDocument(String id) {
        return dao.downDocument(id);
    }

    @Override
    public void deleteDocument(int id) {
        dao.deleteDocument(id);
    }
}
